package com.fy56.platform.logistics.service.wx;


import com.fy56.platform.logistics.common.ResultModel;
import com.fy56.platform.logistics.model.Insurance;
import com.fy56.platform.logistics.model.PayOrder;
import com.fy56.platform.logistics.model.WeChatProgram;

import java.util.Map;

/**
 * 投保服务接口
 *
 * @author  haitao liu
 * @time    2019-03-19
 * @version
 */
public interface IInsuranceService extends IBaseSlaveService<PayOrder> {

    /**
     * 保险登录接口
     *
     * @param loginName
     * @param password
     * @param applicationCode
     * @return
     */
    public ResultModel loginInsuranceService(WeChatProgram weChatProgram, String loginName, String password, String applicationCode) throws Exception;

    /**
     * 根据企业编码查询企业已绑定的保险公司列表
     *
     * @param companyCode
     * @return
     */
    public ResultModel queryInsuranceCompanyByCompanyBindingService(WeChatProgram weChatProgram, String companyCode) throws Exception;

    /**
     * 查询投保险种列表数据
     *
     * @param insurance
     * @param insuranceCompanyId
     * @param bindingFlag
     * @return
     */
    public ResultModel insuranceCodeListService(WeChatProgram weChatProgram, Insurance insurance, String userName, String passpwrd, String insuranceCompanyId, String bindingFlag) throws Exception;

    /**
     * 参保人员列表查询接口
     *
     * @param userName          认证中心登录名
     * @param passpwrd          密码
     * @param insuranceUserType 参保人员类型{0投保人,1被投保人}
     * @param insuranceCodeId   险种ID
     * @return
     * @throws Exception
     */
    public ResultModel queryInsuranceUserListService(WeChatProgram weChatProgram, Insurance insurance, String userName, String passpwrd, Integer insuranceUserType, String insuranceCodeId) throws Exception;

    /**
     * 投保须知查询接口
     *
     * @param insurance
     * @param userName
     * @param passpwrd
     * @param insuranceCodeId
     * @return
     * @throws Exception
     */
    public ResultModel queryInsuranceCodeNoticeContent(WeChatProgram weChatProgram, Insurance insurance, String userName, String passpwrd, String insuranceCodeId) throws Exception;


    /**
     * 保费计算接口
     *
     * @param insurance
     * @param userName
     * @param passpwrd
     * @param insuranceCompanyId
     * @param insuranceCodeId
     * @param sumInsured
     * @param fromArea
     * @param toArea
     * @return
     * @throws Exception
     */
    public ResultModel calculateService(WeChatProgram weChatProgram, Insurance insurance, String userName, String passpwrd, Integer insuranceCompanyId, Integer insuranceCodeId, Double sumInsured, String fromArea, String toArea) throws Exception;

    /**
     * 保单添加及投递Service
     *
     * @param insurance
     * @param userName
     * @param passpwrd
     * @param data
     * @param calculateWithArea
     * @return
     * @throws Exception
     */
    public ResultModel addInsuranceService(WeChatProgram weChatProgram, Insurance insurance, String userName, String passpwrd, String data, String calculateWithArea, String consignmentNumber) throws  Exception;

    /**
     * 查询账户余额
     *
     * @param userName
     * @param passpwrd
     * @param typeCode
     * @return
     * @throws Exception
     */
    public ResultModel queryCompanyAccountService(WeChatProgram weChatProgram, String userName, String passpwrd, String typeCode) throws  Exception;

    /**
     * 保单明细查询接口
     *
     * @param insurance
     * @param userName
     * @param passpwrd
     * @param transactionOrderNo
     * @return
     * @throws Exception
     */
    public ResultModel queryOneService(WeChatProgram weChatProgram, Insurance insurance, String userName, String passpwrd, String transactionOrderNo) throws  Exception;

    /**
     * 保单列表查询
     *
     * @param insurance
     * @param userName
     * @param passpwrd
     * @param startDate
     * @param endDate
     * @param stateFlag
     * @return
     * @throws Exception
     */
    public ResultModel queryListService(WeChatProgram weChatProgram, Insurance insurance, String userName, String passpwrd, String startDate, String endDate, Integer stateFlag, Integer page, Integer pageSize) throws  Exception;

    /**
     * 保险平台返回投保信息服务
     *
     * @param consignmentNumber
     * @param insuranceBillCode
     * @param transactionOrderNo
     * @param stateFlag
     * @param insuranceBillUrl
     * @param insuranceNoticeData
     * @return
     * @throws Exception
     */
    public ResultModel updateInsuranceResultNoticeService(String consignmentNumber, String insuranceBillCode, String transactionOrderNo, Integer stateFlag, String insuranceBillUrl, String insuranceNoticeData)throws Exception;

}